package com.srolorz.fmtp.thread.pool.executor.pool;

import com.srolorz.fmtp.thread.pool.executor.event.ThreadPoolEvent;

import java.util.concurrent.Callable;

/**
 * @author eleven
 */
public class ThreadCallable implements Callable {
    private ThreadPoolEvent event;

    public ThreadCallable(ThreadPoolEvent event) {
        this.event = event;
    }

    @Override
    public Object call() throws Exception {
        this.event.doing();
        return this.event.executeCallEvent();
    }
}
